import request from '@/utils/request'

// 获取部门列表
export const departmentListService = () =>
  request.get('/company/department')

// 获取部门负责人列表
export const departmentManagerListService = () =>
  request.get('/sys/user/simple')

// 新增部门
export const departmentAddService = (data) =>
  request.post('/company/department', data)

// 获取部门详情
export const departmentDetailService = (id) =>
  request.get(`/company/department/${id}`)

// 更新部门信息
export const departmentUpdateService = (data) =>
  request.put(`/company/department/${data.id}`, data)

// 删除部门
export const departmentDeleteService = (id) =>
  request.delete(`/company/department/${id}`)
